package wiki.liven.dto;

import wiki.liven.euum.SeckillEunm;
import wiki.liven.pojo.SuccessSeckilled;

/**
 * Created by qiangjun on 2016/10/21.
 * 执行秒杀业务返回对象DTO
 */
public class SecKillExcution {

    private long secKillId;

    private int state;

    private String stateInfo;

    /**
     * 购买明细
     */
    private SuccessSeckilled successSeckilled;


    public SecKillExcution(long secKillId, SeckillEunm seckillEunm, SuccessSeckilled successSeckilled) {
        this.secKillId = secKillId;
        this.state = seckillEunm.getState();
        this.stateInfo = seckillEunm.getStateInfo();
        this.successSeckilled = successSeckilled;
    }

    public SecKillExcution(long secKillId, SeckillEunm seckillEunm) {
        this.secKillId = secKillId;
        this.state = seckillEunm.getState();
        this.stateInfo = seckillEunm.getStateInfo();
    }

    public long getSecKillId() {
        return secKillId;
    }

    public void setSecKillId(long secKillId) {
        this.secKillId = secKillId;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public SuccessSeckilled getSuccessSeckilled() {
        return successSeckilled;
    }

    public void setSuccessSeckilled(SuccessSeckilled successSeckilled) {
        this.successSeckilled = successSeckilled;
    }

    @Override
    public String toString() {
        return "SecKillExcution{" +
                "secKillId=" + secKillId +
                ", state=" + state +
                ", stateInfo='" + stateInfo + '\'' +
                ", successSeckilled=" + successSeckilled +
                '}';
    }
}
